#!/bin/sh

# script/setup: Set up application for the first time after cloning,
#               or set it back to the initial first unused state.

set -e

cd "$(dirname "$0")/.."

script/bootstrap

cd "$(dirname "$0")/.."

echo "==> Compiling frontend..."
cd tessera-frontend/
./node_modules/.bin/grunt

echo "==> Initializing database..."
cd ../tessera-server/
. env/bin/activate

# Create a fresh database
inv db.init

echo "==> Ready to run!"
